/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.insuranceregi.Model;

import java.net.InetAddress;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author Yogesh
 */
public class insuranceregi_Model extends org.apache.struts.action.ActionForm {
    
String idFromUserInformation;

    public String getIdFromUserInformation() {
        return idFromUserInformation;
    }

    public void setIdFromUserInformation(String idFromUserInformation) {
        this.idFromUserInformation = idFromUserInformation;
    }

    public String getInsuranceHolderAddress() {
        return insuranceHolderAddress;
    }

    public void setInsuranceHolderAddress(String insuranceHolderAddress) {
        this.insuranceHolderAddress = insuranceHolderAddress;
    }

    public String getInsuranceHolderCityName() {
        return insuranceHolderCityName;
    }

    public void setInsuranceHolderCityName(String insuranceHolderCityName) {
        this.insuranceHolderCityName = insuranceHolderCityName;
    }

    public String getInsuranceHolderCountryName() {
        return insuranceHolderCountryName;
    }

    public void setInsuranceHolderCountryName(String insuranceHolderCountryName) {
        this.insuranceHolderCountryName = insuranceHolderCountryName;
    }

    public String getInsuranceHolderEmailId() {
        return insuranceHolderEmailId;
    }

    public void setInsuranceHolderEmailId(String insuranceHolderEmailId) {
        this.insuranceHolderEmailId = insuranceHolderEmailId;
    }

    public String getInsuranceHolderFirstName() {
        return insuranceHolderFirstName;
    }

    public void setInsuranceHolderFirstName(String insuranceHolderFirstName) {
        this.insuranceHolderFirstName = insuranceHolderFirstName;
    }

    public String getInsuranceHolderInsuranceExpired() {
        return insuranceHolderInsuranceExpired;
    }

    public void setInsuranceHolderInsuranceExpired(String insuranceHolderInsuranceExpired) {
        this.insuranceHolderInsuranceExpired = insuranceHolderInsuranceExpired;
    }

    public String getInsuranceHolderInsuranceExpiryDate() {
        return insuranceHolderInsuranceExpiryDate;
    }

    public void setInsuranceHolderInsuranceExpiryDate(String insuranceHolderInsuranceExpiryDate) {
        this.insuranceHolderInsuranceExpiryDate = insuranceHolderInsuranceExpiryDate;
    }

    public String getInsuranceHolderLastName() {
        return insuranceHolderLastName;
    }

    public void setInsuranceHolderLastName(String insuranceHolderLastName) {
        this.insuranceHolderLastName = insuranceHolderLastName;
    }

    public String getInsuranceHolderMiddelname() {
        return insuranceHolderMiddelname;
    }

    public void setInsuranceHolderMiddelname(String insuranceHolderMiddelname) {
        this.insuranceHolderMiddelname = insuranceHolderMiddelname;
    }

    public String getInsuranceHolderMobileNumber() {
        return insuranceHolderMobileNumber;
    }

    public void setInsuranceHolderMobileNumber(String insuranceHolderMobileNumber) {
        this.insuranceHolderMobileNumber = insuranceHolderMobileNumber;
    }

    public String getInsuranceHolderPhoneNumber() {
        return insuranceHolderPhoneNumber;
    }

    public void setInsuranceHolderPhoneNumber(String insuranceHolderPhoneNumber) {
        this.insuranceHolderPhoneNumber = insuranceHolderPhoneNumber;
    }

    public String getInsuranceHolderStateName() {
        return insuranceHolderStateName;
    }

    public void setInsuranceHolderStateName(String insuranceHolderStateName) {
        this.insuranceHolderStateName = insuranceHolderStateName;
    }

    public String getInsuranceHolderVehicleChasisNumber() {
        return insuranceHolderVehicleChasisNumber;
    }

    public void setInsuranceHolderVehicleChasisNumber(String insuranceHolderVehicleChasisNumber) {
        this.insuranceHolderVehicleChasisNumber = insuranceHolderVehicleChasisNumber;
    }

    public String getInsuranceHolderVehicleCubicCapacity() {
        return insuranceHolderVehicleCubicCapacity;
    }

    public void setInsuranceHolderVehicleCubicCapacity(String insuranceHolderVehicleCubicCapacity) {
        this.insuranceHolderVehicleCubicCapacity = insuranceHolderVehicleCubicCapacity;
    }

    public String getInsuranceHolderVehicleManufacturerCompanyName() {
        return insuranceHolderVehicleManufacturerCompanyName;
    }

    public void setInsuranceHolderVehicleManufacturerCompanyName(String insuranceHolderVehicleManufacturerCompanyName) {
        this.insuranceHolderVehicleManufacturerCompanyName = insuranceHolderVehicleManufacturerCompanyName;
    }

    public String getInsuranceHolderVehicleName() {
        return insuranceHolderVehicleName;
    }

    public void setInsuranceHolderVehicleName(String insuranceHolderVehicleName) {
        this.insuranceHolderVehicleName = insuranceHolderVehicleName;
    }

    public String getInsuranceHolderVehicleRCBookScancopy() {
        return insuranceHolderVehicleRCBookScancopy;
    }

    public void setInsuranceHolderVehicleRCBookScancopy(String insuranceHolderVehicleRCBookScancopy) {
        this.insuranceHolderVehicleRCBookScancopy = insuranceHolderVehicleRCBookScancopy;
    }

    public String getInsuranceHolderVehicleRegistrationDate() {
        return insuranceHolderVehicleRegistrationDate;
    }

    public void setInsuranceHolderVehicleRegistrationDate(String insuranceHolderVehicleRegistrationDate) {
        this.insuranceHolderVehicleRegistrationDate = insuranceHolderVehicleRegistrationDate;
    }
String insuranceHolderFirstName;
String insuranceHolderMiddelname;
String insuranceHolderLastName;
String insuranceHolderCountryName;
String insuranceHolderStateName;
String insuranceHolderCityName;
String insuranceHolderAddress;
String insuranceHolderMobileNumber;
String insuranceHolderPhoneNumber;
String insuranceHolderEmailId;
String insuranceHolderVehicleRegistrationDate;
String insuranceHolderInsuranceExpired="no";
String insuranceHolderInsuranceExpiryDate;
String insuranceHolderVehicleName;
String insuranceHolderVehicleManufacturerCompanyName;
String insuranceHolderVehicleChasisNumber;
String insuranceHolderVehicleCubicCapacity;
String insuranceHolderVehicleRCBookScancopy;
String firstName;

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getMobileNumber() {
        return mobileNumber;
    }

    public void setMobileNumber(String mobileNumber) {
        this.mobileNumber = mobileNumber;
    }
String lastName;
String emailId;
String mobileNumber;

String ipAddress;

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    /**
     *
     */
    public insuranceregi_Model() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
//        if (getName() == null || getName().length() < 1) {
//            errors.add("name", new ActionMessage("error.name.required"));
//            // TODO: add 'error.name.required' key to your resources
//        }



       

          InetAddress ip;
	try {

		ip = InetAddress.getLocalHost();
		ipAddress=ip.getHostAddress();



	} catch (Exception e) {

		e.printStackTrace();

	}


        return errors;
    }
}
